<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@taglib prefix="user" uri="/WEB-INF/tags/ErrorTag.tld"%>

<t:basicTemplate pageTitle="SWIMv2 - ${userName} Leave Feedback">

	<jsp:body>
    	<h1>See Feedbacks of ${userName}</h1>


		<div class="error-style">
				<user:errors error="${param.error}"></user:errors>
		</div>
    	<t:errorAndMessage error="${error}" message="${message}" />
		
		
			<c:if test="${not empty (lstHelpRequest) }">
				<c:if test="${fn:length(lstHelpRequest) > 0}">
					
					<c:forEach items="${lstHelpRequest}" var="map">
						    	<br />
					
					<form action="./proceed-leave-feedback" method="POST"
						name="form${map['id']}">
						<!-- 
						
							asking=clod, answering=clod, 
							creation_date=01/21/2013, 
							id=0, title=hel yourSelf!, summary=sjklasdj hkjdf aksdfh	 
							
						 -->
						
						Relative to: ${map['title']}  <br />
						You were helped by:  ${map['answering']}   <BR />
						You asked fot help the day:  ${map['creation_date']}  <BR />
						
						<ul>
							<li><label for="feedback_text">Leave Feedback:</label></li>
							<li><input type="text" name="feedback_text" size="50" /></li>
						</ul>
						<input type="hidden" name="gotBy" value="${map['answering']}" />
						<input type="hidden" name="id" value="${map['id']}" />
						
						<select name="rate">
							<option value="10"> Very Good </option>
							<option value="8"> Good </option>
							<option value="5"> Ok </option>
							<option value="2"> Bad </option>
							<option value="0"> Very Bad </option>
						</select>
						<input type="submit" name="submit" value="Leave Feedback" />
						
					</form>
						
						
					</c:forEach>
				
				</c:if>
			</c:if>
			
			<c:if test="${fn:length(lstHelpRequest) le 0}">
				
				There are no Feedback to leave
				
				(deal with it)
				
			</c:if>

	


		
    	
    </jsp:body>
</t:basicTemplate>